﻿using System;
using System.ComponentModel;

namespace YArchitech.Controls
{
	public class HYProperty
	{
		public bool Visible
		{
			get
			{
				return this._visible;
			}
			set
			{
				this._visible = value;
			}
		}

		public HYProperty()
		{
		}

		public HYProperty(string sName, object sValue)
		{
			this.theName = sName;
			this.theValue = sValue;
		}

		public HYProperty(string sName, object sValue, bool sReadonly, bool sVisible)
		{
			this.theName = sName;
			this.theValue = sValue;
			this.readOnly = sReadonly;
			this._visible = sVisible;
		}

		public TypeConverter Converter
		{
			get
			{
				return this._converter;
			}
			set
			{
				this._converter = value;
			}
		}

		public object Editor
		{
			get
			{
				return this._editor;
			}
			set
			{
				this._editor = value;
			}
		}

		public string DisplayName
		{
			get
			{
				if (string.IsNullOrEmpty(this._displayName))
				{
					return this.theName;
				}
				return this._displayName;
			}
			set
			{
				this._displayName = value;
			}
		}

		public bool ReadOnly
		{
			get
			{
				return this.readOnly;
			}
			set
			{
				this.readOnly = value;
			}
		}

		public string Category
		{
			get
			{
				return this.theCategory;
			}
			set
			{
				this.theCategory = value;
			}
		}

		public string Name
		{
			get
			{
				return this.theName;
			}
			set
			{
				this.theName = value;
			}
		}

		public object Value
		{
			get
			{
				return this.theValue;
			}
			set
			{
				this.theValue = value;
			}
		}

		public string Description
		{
			get
			{
				return this.theDescription;
			}
			set
			{
				this.theDescription = value;
			}
		}

		private string theCategory = "";

		private string theName = "";

		private string theDescription = "";

		private object theValue;

		private bool readOnly;

		private string _displayName = string.Empty;

		private TypeConverter _converter;

		private bool _visible = true;

		private object _editor;
	}
}
